// 引入模块（Express固定语法）
const express = require('express');
const router = express.Router();
const path = require("path");
 
// 获取验证模块
var authorization = require(path.join(process.cwd(),"/application/routes/api/authorization"));

// 通过验证模块获取菜单服务模块
var menuService = require(path.join(process.cwd(),"/application/services/MenuService"));

router.get("/",
	function(req,res,next) {
		menuService.getLeftMenus(req.userInfo,function(err,result) {
			if(err) return res.sendJson(400,err, null); 
			res.sendJson(200,"获取菜单列表成功",result);
		});
	}
);

module.exports = router;